/**<
6. Write a program that asks the user to enter the number of pancakes eaten for
 breakfast by 10 different people (Person 1, Person 2, ..., Person 10)
Once the data has been entered the program must analyze the data and output
which person ate the most pancakes for breakfast.
 */

#include <iostream>;
using namespace std;

 void MaxPancakes()
 {
 //get data from user
 int nArray_Size = 10;
 int nPerson[nArray_Size];
 for(int i=0; i < nArray_Size; i++)
 {
     cout << "Enter # of pancakes for person " << i+1 << endl;
     cin >> nPerson[i];
 }
  //return the correct user
  int temp_Max = 0, nWinner = 0;

    //calculate which user ate the most pancakes
    for(int i = 0; i < nArray_Size; i++ )
    {
        if (temp_Max < nPerson[i])
            {
            nWinner = i;
            temp_Max = nPerson[i];
            }
    }
 cout << "Most pancakes eaten: Person " << nWinner+1;
 }

